package com.stock.job;

import com.stock.service.StockTimerTaskService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

//TODO 股票采集的定时任务
@Component
public class StockJob {

    @Autowired
    private StockTimerTaskService stockTimerTaskService;

    //TODO 采集国内大盘数据
    @XxlJob("getStockInnerMarketInfoTask")
    public void getStockInnerMarketInfoTask(){
        stockTimerTaskService.getInnerMarketInfo();
    }

    //TODO 采集国内A股数据
    @XxlJob("getStockInfoTask")
    public void getStockInfoTask(){
        stockTimerTaskService.getStockRtIndex();
    }

    //TODO 采集国内大盘板块数据
    @XxlJob("getStockBlockInfoTask")
    public void getStockBlockInfoTask(){
        stockTimerTaskService.getStockBlockInfo();
    }

    //TODO 采集国外大盘板块数据
    @XxlJob("getStockOuterMarketInfoTask")
    public void getStockOuterMarketInfoTask(){
        stockTimerTaskService.getStockOuterMarketInfo();
    }
}
